<?php
	require_once '../lib/upload.class.php';
	require_once '../../lib/sql.utils.php';
	$name = $_POST ['name'];
	$description = $_POST ['description'];
	
	$sql_util = new SqlUtils();
	$colList = array('categoryName','categoryDescription');
	$rowList = array(array('"'.$name.'"','"'.$description.'"'));
	$tbl = 'categories';
	$result = $sql_util->insertRows($colList,$rowList,$tbl);
	//var_dump($sql_util->insertRows($colList,$rowList,$tbl));
	if($result == true) echo 'success';
	else {
		echo 'error';
	}
	header("location:../index.php");
?>